// 项目配置信息
import $config from '../config/config.js'
// http请求工具
import $http from '../../core/libs/request/index.js'

/** API接口路径 */
const apiPath = {
    getWangYiNews: $config.getUrl('apiopen') + '/getWangYiNews', // 获取网易新闻 
}

/** 
 * 接口封装
 * @description 可直接通过api调用
 * 示例：
 * app.$g.api.getWangYiNews().then(res=>{
 *      console.log(res);
 * })
 */
const api = {
    /** 获取网易新闻 */
    getWangYiNews: (param = {}) => $http.get(apiPath.getWangYiNews, param),
}

export default {
    apiPath: apiPath,
    api: api
};
